home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 60.zip
/
BS1 part 60
/
Imagemaster d1.adf
/
install-im
< prev
next >
Wrap
Text File
|
1993-08-31
|
23KB
|
649 lines
; CBM installer script to install Imagemaster R/t on users
; hard-drive. Loosely derived from the original Imagemaster
; installation script.
; --------------------------------------------------------------
; Copyright 1993, Black Belt Systems, ALL RIGHTS RESERVED
; --------------------------------------------------------------
; Written by: Ben Williams
; Date Written: July 26th, 1993
; For: Imagemaster R/t v1.00
; --------------------------------------------------------------
; Updates: None at this time
; --------------------------------------------------------------
;Notes:
;------->
; (1) We force a minimum level of AVERAGE user so that they
; must specify the target directory for the install and
; answer some basic questions such as "Do you have an FPU"
;
; (2) There must be sufficient diskspace to install the software
; or we won't even try to install.
;
; (3) The ARexx REXX assign must be available, or we can't install
;
; (4) If the user has already assigned targets for ALL of:
; RXPI:
; CMPI:
; IMDOC:
; IMCAT:
; Then we will not attempt to create directories in the
; Imagemaster R/t drawer for them. Instead, we will install
; the relevant portions of the software to the specified
; locations. This MAY defeat the available space checking
; code in the install script, if these locations are on
; a different volume than the target volume.
;
; (5) Max split size is 840,000 bytes
;------------------------------------------------------------------
; Install script is initiated from disk one of the install group,
; so we do all things we possibly can from disk 1, first.
; Disk 1 is where most of the miscellaneous items are stored.
;----------------------------------------------------------------
; cleanup routine
;----------------
(onerror)
; Create disk filesystem names and volume names
; Some installer functions want the ":" character, and
; some don't. Another blow for consistancy in programming.
; --------------------------------------------------------
(set d1 "IM_Install1:") (set v1 "IM_Install1")
(set d2 "IM_Install2:") (set v2 "IM_Install2")
(set d3 "IM_Install3:") (set v3 "IM_Install3")
(set d4 "IM_Install4:") (set v4 "IM_Install4")
(set d5 "IM_Install5:") (set v5 "IM_Install5")
(set d6 "IM_Install6:") (set v6 "IM_Install6")
; This IM R/t release is (approximately) sized as follows:
;---------------------------------------------------------
(set misc_spc 50000)
(set imrt_spc 2100000)
(set film_spc 180000)
(set isha_spc 25000)
(set devl_spc 10000)
(set pimo_spc 2000000)
(set apas_spc 60000)
(set adoc_spc 1400000)
; Make certain rexx: directory exists - if ARexx isn't running, we
; can (sortof) live with that, though the user will be seriously
; crippled in capability. If no assignment exists, we're toast
;-----------------------------------------------------------------
(if (= (getassign "rexx") "")
( ; Then...
(abort "Cannot install - no REXX: assignment in this system. "
"You MUST have ARexx and a drawer assigned to REXX: "
"to hold ARexx scripts in order to successfully "
"install Imagemaster. Please properly configure "
"your computer and try again. If you do not know how "
"to accomplish this, call your dealer or consultant."
)
)
)
; Find out where user wants to put Imageaster
;--------------------------------------------
(set user_place
(askdir
(prompt "On which Volume shall we place the Imagemaster Drawer? ")
(help @askdir-help "It is important that you realize that the destination volume you specify "
"here is where the DRAWER in which Imagemaster and its associated data "
"files will be placed. Even if this is an update to an earlier "
"installation, you still need to specify this location the same way. "
"Otherwise, a new \"Imagemaster\" drawer will be created INSIDE your "
"old one, causing much confusion and not amusing anyone.")
(default @default-dest)
)
)
; Check to see if assigns are already made
; This accounts for custom installs by techno-types
;--------------------------------------------------
(set as_made 0)
(if (<> (getassign "rxpi:") "")
(if (<> (getassign "cmpi:") "")
(if (<> (getassign "IMDOC:") "")
(if (<> (getassign "IMCAT:") "")
(set as_made 1) ; All four assigns must be made!
)
)
)
)
; Find out if user wants the developer code
;------------------------------------------
(set dev_install
(askoptions
(prompt "Would you like to have the Public Interface developer "
"C and ARexx code, with documentation? This will allow "
"you to create public interface modules of your own, IF "
"you own the SAS C compiler and have typical Amiga "
"developer skills.")
(help @askoptions-help "If you are NOT a technical type, "
"you have no need for this data. If you are, then by all "
"means install it!")
(choices "Install SAS C and ARexx developer code?")
(default 0)
)
)
; Check with user if they want the floating point version
;--------------------------------------------------------
(set float_install
(askchoice
(prompt "Install the hardware floating-point version? ")
(help "An FPU is a special hardware mathematics processor "
"which allows a computer which uses it to figure out "
"answers to math problems using floating point math "
"much faster than it could without an FPU. A 68000 "
"Amiga has no FPU. 68020 or 68030 based-Amigas may "
"have an FPU - check your documentation if you're not "
"certain. 68040-based Amigas always have the FPU built "
"right in. The non-FPU version will work on an Amiga "
"with an FPU, however it will be much slower which "
"will cost you unecessary time when processing images. "
@askchoice-help)
(choices "Install Floating Point (FPU) version"
"Install standard (NON-FPU) version")
(default 1)
)
)
; Derive total install space
; for required elements of installation:
; ----------------------------------------------------------------
(set total_size imrt_spc) ; Imagemaster R/t
(set total_size (+ total_size film_spc)) ; Filmstrip Viewer
(set total_size (+ total_size isha_spc)) ; IShapes files
(set total_size (+ total_size pimo_spc)) ; PI Modules
(set total_size (+ total_size adoc_spc)) ; Hypertext Documentation
(set total_size (+ total_size misc_spc)) ; Any remaining items...
; Add space for developer code, if desired
; ----------------------------------------
(if (= dev_install 1)
( ; Then...
(set total_size (+ total_size devl_spc)) ; Developer Code
)
)
; Decide if we can install ApAssist in the c: directory
; If we can, we do it immediately, before we do the rest
; of the install - this will ensure that the disk space
; check will take it into account if it is on the same
; volume by virtue of its already taking up space; if
; it's not on the same volume, then we won't "see" it in
; the disk space check, and that works fine too. This
; install comes from disk one:
; -----------------------------------------------------
(set app_space (getdiskspace "c:"))
(if (< app_space apas_spc)
( ; Then
(set app_in_c 0)
(set total_size (+ total_size apas_spc)) ; ApAssist executable
(copyfiles (source d1)
(dest "ram:")
(pattern "ApAssist")
(files)
)
)
( ; Else...
(set app_in_c 1)
(copyfiles (source d1)
(dest "c:")
(pattern "ApAssist")
(files)
)
)
)
; At this point, we've got a pretty good handle on installation
; storage requirements, with the possible exception of if the
; user has created custom assignments for all of RXPI, CMPI,
; IMDOC and IMCAT - in which case we can mistakenly abort here
; if the target disk is short on space. Hopefully a technically
; competant user such as would intentionally redirect the
; installation using assigns will manage their system well
; enough to avoid that problem. If we can't do the main install,
; we quit immediately with an informative message.
; -------------------------------------------------
(set tgt_space (getdiskspace user_place))
(if (< tgt_space total_size)
( ; Then...
(abort "This installation requires about " ("%ld" total_size)
" bytes free on the "
"volume where you wish to install Imagemaster. Please "
"make this space available and then re-install. For your "
"information, the volume you have selected has only "
("%ld " tgt_space) "bytes free. You need "
("%ld " (- total_size tgt_space)) "more bytes."
)
)
)
; Get the items we need from disk 1
;----------------------------------
(copyfiles (source d1)
(dest "ram:")
(pattern "(extract|join|delete|fv.lzh|ish.lzh|imi.lzh|dc.lzh|ia.lzh|ib.lzh)")
(files)
)
(if (= dev_install 1)
( ; Then...
(copyfiles (source d1)
(dest "ram:")
(pattern "dd.lzh")
(files)
)
)
)
; We've got the target; now we need to make sure that we have our main DIR
;-------------------------------------------------------------------------
(set im_dest (tackon user_place "Imagemaster"))
(if (not (exists im_dest))
( ; Then...
(makedir im_dest (infos))
)
)
(set @default-dest im_dest)
; Create subordinate target strings
;----------------------------------
(set rxpi_dir (tackon im_dest "rxpi"))
(set wipe_dir (tackon rxpi_dir "wipes"))
(set cmpi_dir (tackon im_dest "cmpi"))
(set ish_dir (tackon im_dest "IShapes"))
(set dev_dir (tackon im_dest "Developer"))
(set imdoc_dir (tackon im_dest "imdoc"))
(set imcat_dir (tackon im_dest "imcat"))
(set lib_dir "libs:")
(set rexx_dir "rexx:")
; Create RXPI drawer if it's not already there
; and if user doesn't have it custom assigned
; elsewhere
;---------------------------------------------
(if (not (exists rxpi_dir))
( ; Then...
(if (= as_made 0)
( ; Then...
(makedir rxpi_dir (infos))
)
)
)
)
; Create wipes drawer if it's not already there
;----------------------------------------------
(if (not (exists wipe_dir))
( ; Then...
(makedir wipe_dir (infos))
)
)
; Create CMPI drawer if it's not already there
; and if user doesn't have it custom assigned
; elsewhere
;---------------------------------------------
(if (not (exists cmpi_dir))
( ; Then...
(if (= as_made 0)
( ; Then...
(makedir cmpi_dir (infos))
)
)
)
)
; Create IShapes drawer if it's not already there
;------------------------------------------------
(if (not (exists ish_dir))
( ; Then...
(makedir ish_dir (infos))
)
)
; Create IMDOC drawer if it's not already there
; and if user doesn't have it custom assigned
; elsewhere
;----------------------------------------------
(if (not (exists imdoc_dir))
( ; Then...
(if (= as_made 0)
( ; Then...
(makedir imdoc_dir (infos))
)
)
)
)
; Create IMCAT drawer if it's not already there
; and if user doesn't have it custom assigned
; elsewhere
;----------------------------------------------
(if (not (exists imcat_dir))
( ; Then...
(if (= as_made 0)
( ; Then...
(makedir imcat_dir (infos))
)
)
)
)
; Make assignments so user can operate immediately
; If the user has already specially made these assignments,
; then we'll use those locations as targets instead
;----------------------------------------------------------
(if (= as_made 0)
( ; Then...
(makeassign "RXPI" rxpi_dir (safe))
(makeassign "CMPI" cmpi_dir (safe))
(makeassign "IMDOC" imdoc_dir (safe))
(makeassign "IMCAT" imcat_dir (safe))
)
)
; Extract this portion of the installation
;-----------------------------------------
(run ("ram:extract >con:0/50/640/100/extract -m e ram:imi %s/" im_dest))
(run ("ram:extract >con:0/50/640/100/extract -m e ram:fv %s/" im_dest))
(run ("ram:extract >con:0/50/640/100/extract -m e ram:ish %s/" ish_dir))
; Decide about .info file name
;-----------------------------
(if (= float_install 0)
( ; Then...
rename (tackon im_dest "iminfo") (tackon im_dest "imf.info")
)
( ; Else...
rename (tackon im_dest "iminfo") (tackon im_dest "im.info")
)
)
; Clean up after these archives
;------------------------------
(delete "ram:ish.lzh")
(delete "ram:fv.lzh")
(delete "ram:imi.lzh")
; Install DCTV.Library
; --------------------
(run ("ram:extract >con:0/50/640/100/extract -m e ram:dc ram:"))
(copylib (source "ram:dctv.library") (dest "libs:"))
(delete "ram:dc.lzh")
(delete "ram:dctv.library")
; Set variables pointing to the disk with the correct IM R/t archive
;-------------------------------------------------------------------
(if (= float_install 0)
( ; Then...
(set imp_src d3)
(set imv_src v3)
(set proc_file "imb.lzh")
(delete "ram:ia.lzh")
(run ("rename ram:ib.lzh ram:iii.lzh"))
)
( ; Else...
(set imp_src d2)
(set imv_src v2)
(set proc_file "ima.lzh")
(delete "ram:ib.lzh")
(run ("rename ram:ia.lzh ram:iii.lzh"))
)
)
; Ask for the proper diskette
;----------------------------
(askdisk
(prompt ("Please insert the %s diskette " imv_src))
(help "This diskette is absolutely required to complete this "
"installation! It contains the version of Imagemaster R/t "
"You requested (floating point, or non floating point).")
(dest imv_src)
)
; This gets the needed archive from the proper disk
;--------------------------------------------------
(copyfiles (source imp_src)
(dest "ram:")
(pattern proc_file)
(files)
)
; Cojoin the fragments of the R/t archive and toss the sources
;-------------------------------------------------------------
(run ("ram:join ram:%s ram:iii.lzh TO ram:ixi.lzh" proc_file))
(delete ("ram:%s" proc_file))
(delete "ram:iii.lzh")
; Here, we extract the image processor, copying it at the same time
;------------------------------------------------------------------
(run ("ram:extract >con:0/50/640/100/extract -m e ram:ixi.lzh %s/" im_dest))
; Delete the joined image processor archive
;------------------------------------------
(delete ("ram:ixi.lzh"))
; If user wants the developer stuff, install it
;----------------------------------------------
(if (= dev_install 1)
( ; Then...
(if (not (exists dev_dir))
( ; Then...
(makedir dev_dir (infos))
)
)
(run ("ram:extract >con:0/50/640/100/extract -m e ram:dd %s/" dev_dir))
(delete "ram:dd.lzh")
)
)
; Install the ApAssist documentation
; ----------------------------------
(askdisk
(prompt ("Please insert the %s diskette " v4))
(help "This diskette is required to complete the "
"installation. It contains the documentation "
"for the Imagemaster R/t software!")
(dest v4)
)
(copyfiles (source d4)
(dest "ram:")
(pattern "apa.lzh")
(files)
)
(run ("ram:extract >con:0/50/640/100/extract -m e ram:apa %s/" imdoc_dir))
(delete "ram:apa.lzh")
; Get the PI Module archive chunks....
;-------------------------------------
(makedir "ram:gbzyx")
(askdisk
(prompt ("Please insert the %s diskette " v5))
(help "This diskette is required to install "
"the PI Modules")
(dest v5)
)
(copyfiles (source d5)
(dest "ram:")
(pattern "piarc.lzh.parta")
(files)
)
; Get part B of the piarc.lzh file
;----------------------------------------------------------
(askdisk
(prompt ("Please insert the %s diskette " v6))
(help "This diskette is required to install "
"the PI Modules.")
(dest v6)
)
(copyfiles (source d6)
(dest "ram:")
(pattern "piarc.lzh.partb")
(files)
)
; Now, enjoin the two lzh fragments back into a usable archive:
; -------------------------------------------------------------
(run ("ram:join ram:piarc.lzh.parta ram:piarc.lzh.partb TO ram:piarc.lzh"))
; Get rid of fragments
; --------------------
(run ("ram:delete ram:piarc.lzh.part? QUIET"))
; Now to get the PI modules installed
; Begin by backing up old macro file(s), if they exist
;-----------------------------------------------------
(if (exists "s:Default.immcr.old")
(delete "s:Default.immcr.old"))
(if (exists "s:Default.immcr")
(rename "s:Default.immcr" "s:Default.immcr.old"))
;---------------
(if (exists "s:Default.iimcr.old")
(delete "s:Default.iimcr.old"))
(if (exists "s:Default.iimcr")
(rename "s:Default.iimcr" "s:Default.iimcr.old"))
;---------------
(if (exists "s:Default.ipmcr.old")
(delete "s:Default.ipmcr.old"))
(if (exists "s:Default.ipmcr")
(rename "s:Default.ipmcr" "s:Default.ipmcr.old"))
;---------------
; Old macros are backed up, ready for main PI install
; Extract the PI Modules
;----------------------------------------------------
(run ("ram:extract >con:0/50/640/100/extract -m e ram:piarc ram:gbzyx/"))
(delete "ram:piarc.lzh")
; Archive is unpacked and ready to copy
; first, backup list.list if available
;--------------------------------------
(if (exists "cmpi:list.list")
( ; Then...
(if (exists "cmpi:list.list.old")
( ; Then...
(delete "cmpi:list.list.old")
)
)
(rename "cmpi:list.list" "cmpi:list.list.old")
(message "Please note that during installation, your previous "
"\"list.list\" file was located and renamed to "
"\"list.list.old\". All of your aftermarket PI "
"modules (if any) are still intact, but will not "
"show up on PI lists untill the new list.list file "
"has been appropriately modified."
(help "This has been done so that you may refer to it if "
"you had aftermarket PI modules declared in it. "
"A new list.list file has been created as part of "
"this install procedure - you should use this new "
"list.list file instead of the old one (that will "
"happen automatically) but if you DID have any "
"aftermarket PI modules, such as Metadigm's ES300c "
"scanner driver, you'll need to add the control "
"line(s) for it (them) into the new list.list file. "
"You would then use the old list.list file as a template "
"to accomplish this.")
)
)
)
; move the "odd" files (not PI rexx or PI cmds)
;----------------------------------------------
(copyfiles (source "ram:gbzyx") (dest "rexx:")
(pattern "(picmdpath|launch.rexx|imtf.rexx)") (files))
(copyfiles (source "ram:gbzyx") (dest "s:")
(pattern "(default.??mcr)") (files))
(copyfiles (source "ram:gbzyx") (dest "cmpi:")
(pattern "list.list") (files))
(copyfiles (source "ram:gbzyx") (dest "rxpi:wipes")
(pattern "#?.rxwp") (files))
(delete "ram:gbzyx/picmdpath")
(delete "ram:gbzyx/list.list")
(delete "ram:gbzyx/launch.rexx")
(delete "ram:gbzyx/imtf.rexx")
(run "ram:delete ram:gbzyx/Default.??mcr QUIET")
(run "ram:delete ram:gbzyx/#?.rxwp QUIET")
; Next, copy all the PI ARexx scripts
;------------------------------------
(copyfiles (source "ram:gbzyx") (dest "rxpi:")
(pattern "#?.rexx") (files))
(run "ram:delete ram:gbzyx/#?.rexx QUIET")
; Next, copy all the PI Commands
;-------------------------------
(copyfiles (source "ram:gbzyx") (dest "cmpi:")
(pattern "#?") (files))
; Now, we have to decide if we can install the FPU PI modules
;------------------------------------------------------------
(if (exists "CMPI:rdjpg") (delete "CMPI:rdjpg"))
(if (exists "CMPI:wrjpg") (delete "CMPI:wrjpg"))
(if (= float_install 0)
( ; Then...
(rename "CMPI:x_JPR030" "CMPI:rdjpg")
(rename "CMPI:x_JPW030" "CMPI:wrjpg")
)
( ; Else...
(rename "CMPI:x_JPR000" "CMPI:rdjpg")
(rename "CMPI:x_JPW000" "CMPI:wrjpg")
)
)
; If we did NOT install ApAssist into the user's "c:" assignment
; due to a lack of room, we'll now put it here in the main IM
; drawer. This is workable for us, but unfortunate because it
; won't be generally available to other applications
; --------------------------------------------------
(if (= app_in_c 0)
( ; Then...
(copyfiles (source "ram:") (dest im_dest)
(pattern "ApAssist") (files))
(delete "ram:ApAssist")
)
)
; clean up
;---------
(run "ram:delete CMPI:x_#? QUIET")
(run "ram:delete ram:gbzyx/#? QUIET")
(delete "ram:gbzyx")
(delete "ram:extract")
(delete "ram:delete")
(delete "ram:join")
; Add assignment to user's "user-startup" directory for new boot ops
; IF they were not already correctly done - otherwise skip this part
;-------------------------------------------------------------------
(if (= as_made 0)
( ; Then...
(startup "Imagemaster"
(help "This operation adds lines to your user-startup file "
"which are harmless assignment statements to drawers "
"within the Imagemaster drawer, called \"RXPI:\", \"IMDOC:\", "
"\"IMCAT:\" and \"CMPI:\" each time you boot your Amiga. "
"These assignments are used to let Imagemasters Public "
" Interface \(PI\) drivers know where its data files reside. "
"Unless you know that you have another assignment with one "
"of these names, it is extremely unlikely that there would "
"be any reason to NOT let this happen.")
(prompt "Is it o.k. to add four SAFE lines to your User-Startup "
"file?")
(command ("assign RXPI: %s\n" rxpi_dir))
(command ("assign CMPI: %s\n" cmpi_dir))
(command ("assign IMDOC: %s\n" imdoc_dir))
(command ("assign IMCAT: %s\n" imcat_dir))
)
)
)
(exit)